<template>
  <div class="hello">
    <h1>{{msg}}</h1>
    <el-row>
      <el-button @click="submitForm">默认按钮</el-button>
      <el-button type="primary">主要按钮</el-button>
      <el-button type="success">成功按钮</el-button>
      <el-button type="info">信息按钮</el-button>
      <el-button type="warning">警告按钮</el-button>
      <el-button type="danger">危险按钮</el-button>
    </el-row>
  </div>
</template>
<script>
export default {
  name: 'Test',
  data () {
    return {
      msg: 'testdata'
    }
  },
  methods: {
    submitForm () {
      this.axios.get('/site/index').then((response) => {
        this.msg = response.data.msg
      }).catch(function (error) {
        console.log(error)
      })
    }
  }
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
h1, h2 {
  font-weight: normal;
  color: #000;
  font-size: 0.4rem;
}
ul {
  list-style-type: none;
  padding: 0;
}
li {
  display: inline-block;
  margin: 0 10px;
}
a {
  color: #42b983;
}
</style>
